/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.base.entity.fixedexpense;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.modules.base.entity.supplier.Supplier;
import org.hibernate.validator.constraints.Length;

/**
 * 固定费用项目Entity
 * @author Kilo
 * @version 2021-03-02
 */
@Table(name="t_ladder_price", alias="a", columns={
		@Column(name="ladder_price_id", attrName="ladderPriceId", label="阶梯价格ID", isPK=true),
		@Column(name="investor_id", attrName="investorId", label="资方"),
		@Column(name="start_amount", attrName="startAmount", label="起始金额"),
		@Column(name="end_amount", attrName="endAmount", label="结束金额"),
		@Column(name="sales_price", attrName="salesPrice", label="销售价格"),
		@Column(name="purchase_price", attrName="purchasePrice", label="采购价格"),
		@Column(name="fixed_expense_id", attrName="fixedExpenseId.fixedExpenseId", label="固定费用项目ID"),
	}, joinTable={
		@JoinTable(type=Type.LEFT_JOIN, entity= Supplier.class, attrName="supplier", alias="u11",
				on="u11.supplier_id = a.investor_id", columns={
				@Column(name="supplier_id", label="供应商编码", isPK=true),
				@Column(name="supplier_name", label="供应商名称", isQuery=false),
		}),
	},orderBy="a.ladder_price_id ASC"
)
public class LadderPrice extends DataEntity<LadderPrice> {
	
	private static final long serialVersionUID = 1L;
	private String ladderPriceId;		// 阶梯价格ID
	private String investorId;		// 资方
	private Double startAmount;		// 起始金额
	private Double endAmount;		// 结束金额
	private Double salesPrice;		// 销售价格
	private Double purchasePrice;		// 采购价格
	private FixedExpense fixedExpenseId;		// 固定费用项目ID 父类
	private Supplier supplier;

	public Supplier getSupplier() {
		return supplier;
	}

	public void setSupplier(Supplier supplier) {
		this.supplier = supplier;
	}
	public LadderPrice() {
		this(null);
	}


	public LadderPrice(FixedExpense fixedExpenseId){
		this.fixedExpenseId = fixedExpenseId;
	}
	
	public String getLadderPriceId() {
		return ladderPriceId;
	}

	public void setLadderPriceId(String ladderPriceId) {
		this.ladderPriceId = ladderPriceId;
	}
	
	@Length(min=0, max=64, message="资方长度不能超过 64 个字符")
	public String getInvestorId() {
		return investorId;
	}

	public void setInvestorId(String investorId) {
		this.investorId = investorId;
	}
	
	public Double getStartAmount() {
		return startAmount;
	}

	public void setStartAmount(Double startAmount) {
		this.startAmount = startAmount;
	}
	
	public Double getEndAmount() {
		return endAmount;
	}

	public void setEndAmount(Double endAmount) {
		this.endAmount = endAmount;
	}
	
	public Double getSalesPrice() {
		return salesPrice;
	}

	public void setSalesPrice(Double salesPrice) {
		this.salesPrice = salesPrice;
	}
	
	public Double getPurchasePrice() {
		return purchasePrice;
	}

	public void setPurchasePrice(Double purchasePrice) {
		this.purchasePrice = purchasePrice;
	}
	
	public FixedExpense getFixedExpenseId() {
		return fixedExpenseId;
	}

	public void setFixedExpenseId(FixedExpense fixedExpenseId) {
		this.fixedExpenseId = fixedExpenseId;
	}
	
}